package com.xinqi.modules.prepare.prepare.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

public enum PrepareQuestionImportItemTypeEnum implements BaseEnum {
    TOPIC("7", "【题文】"),

    CHOICE("8", "【选项】"),

    ANSWER("9", "【答案】"),

    ANALYSIS("10", "【解析】"),

    FINISH("11", "【结束】"),

    SCORE("12", "【分值】");

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    PrepareQuestionImportItemTypeEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static PrepareQuestionImportItemTypeEnum of(String code) {
        return BaseEnum.of(PrepareQuestionImportItemTypeEnum.class, code);
    }

}
